﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="MVCClubSite.Web.Views.Albums.List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div class="contentblock">
        <h2>
            Photo Albums</h2>
        <p>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt, turpis
            id vehicula condimentum, mauris arcu aliquam tellus, pretium ultrices quam enim
            non felis. Fusce eget elit. Etiam eleifend scelerisque ligula. Proin malesuada tristique
            metus. Aenean ligula magna, aliquet et.</p>
             <% if (User.IsInRole("Administrator")) { %>
        <%= Html.ActionLink("Create Album", "New") %>
        <%} %>
        <hr />
        <br />
        <% foreach (Album a in ViewData.Model.Albums)
           {%>
        <div class="album">
            <div style="float: left; padding: 0 5px 0 0;">
                <%= "<a href='/Albums/Details/" + a.ID + "'>" + Html.Image("~/Images/ThumbnailImage/" + a.ThumbnailID) + "</a>" %>
            </div>
            <%= Html.ActionLink(a.Title, "Details", new{ id = a.ID }) %>
            <br />
            <br />
            <%= "Image Count: " + a.ImageCount %>
        </div>
        <%} %>
        <div class="clear">
        </div>
  </div>
</asp:Content>
